import com.pattern.command.frame.CommandChain;
import com.pattern.command.tenant.Command1;
import com.pattern.command.tenant.Command2;
import com.pattern.command.tenant.Command3;

public class Main {

    public static void main(String[] args) {
        CommandChain chain = new CommandChain();

        chain.addCommand(new Command1("zhangsan"));

        chain.addCommand(new Command2("iphone001"));

        chain.addCommand(new Command3("zhangsan", "iphone001"));

        boolean result = chain.executeCommands(); // result是整体成功失败情况
    }
}
